package com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.steward;

import com.slz3.business.frame.response.RR;
import com.slz3.business.frame.response.ResInfo;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttribute;
import com.slz3.business.module.goodsManagement.gooBaseGoodsAttribute.domain.GooBaseGoodsAttributeCondition;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

@Component
public class GooBaseGoodsAttributeResAtomic {

    public Mono<ServerResponse> add_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttribute gooBaseGoodsAttribute) {
        return GooBaseGoodsAttributeResSafeValid.add(req, gooBaseGoodsAttribute) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.add(req, gooBaseGoodsAttribute);
    }

    public Mono<ServerResponse> delete_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.delete(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.delete(req);
    }

    public Mono<ServerResponse> modify_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttribute gooBaseGoodsAttribute) {
        return GooBaseGoodsAttributeResSafeValid.modify(req, gooBaseGoodsAttribute) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.modify(req, gooBaseGoodsAttribute);
    }

    public Mono<ServerResponse> info_$GooBaseGoodsAttributeUpdateLock(ServerRequest req) {
        return GooBaseGoodsAttributeResSafeValid.info(req) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.info(req);
    }

    public Mono<ServerResponse> auditSubmit_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.auditSubmit(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.auditSubmit(req);
    }

    public Mono<ServerResponse> audit_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.audit(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.audit(req);
    }

    public Mono<ServerResponse> auditReject_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.auditReject(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.auditReject(req);
    }


    public Mono<ServerResponse> usingEnable_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.usingEnable(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.usingEnable(req);
    }

    public Mono<ServerResponse> usingDisable_$GooBaseGoodsAttributeUpdateLock(ServerRequest req, GooBaseGoodsAttributeCondition gooBaseGoodsAttributeCondition) {
        return GooBaseGoodsAttributeResSafeValid.usingDisable(req, gooBaseGoodsAttributeCondition) ?
                RR.fail(req, ResInfo.builder().theme(RR.SAFE_VALID).build()) :
                GooBaseGoodsAttributeResExecutor.usingDisable(req);
    }
}
